package com.javaee.ioc.xml;


public class Robot {
    // 添加greeting属性
    private Greeting greeting;

    public Greeting getGreeting() {
        return greeting;
    }

    public void setGreeting(Greeting greeting) {
        this.greeting = greeting;
    }

    public void sayHello() {
        greeting.sayHello();
    }
}
